import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxWorkerAverageSalaryBarChart from "./index";

const meta = {
  title: "柱状图/可信工人平均工资统计柱状图KxWorkerAverageSalaryBarChart",
  component: KxWorkerAverageSalaryBarChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "469px", width: "1088px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxWorkerAverageSalaryBarChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    unitName: "元",
    dataSource: [
      {
        amount: 1300,
        name: "1",
      },
      {
        amount: 5000,
        name: "2",
      },
      {
        amount: 3800,
        name: "3",
      },
      {
        amount: 3200,
        name: "4",
      },
      {
        amount: 3500,
        name: "5",
      },
      {
        amount: 1000,
        name: "6",
      },
      {
        amount: 5500,
        name: "7",
      },
      {
        amount: 5400,
        name: "8",
      },
      {
        amount: 2800,
        name: "9",
      },
      {
        amount: 4000,
        name: "10",
      },
      {
        amount: 4400,
        name: "11",
      },
      {
        amount: 4100,
        name: "12",
      },
    ],
  },
};

export const constructionRobot: Story = {
  args: {
    height: "469px",
    unitName: "台班",
    dataSource: [
      { name: "马銮湾保障房地铁社区二期A01~03地块", amount: 240 },
      { name: "马銮湾保障房地铁社区二期A04~07地块", amount: 420 },
      { name: "保障性住房龙泉公寓一期", amount: 700 },
      { name: "洪茂居住区一期", amount: 320 },
      { name: "东园保障性住房", amount: 320 },
    ],
  },
};
